package com.alaia.alaiaauth.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@RestController
public class VerifyCodeController {

    //获取验证码
    @GetMapping("/vc.jpg")
    public String getVerifyCode(HttpServletResponse resp, HttpSession session){
        resp.setContentType("image/jpeg");
        String text = "123456";
        session.setAttribute("verify_code", text);
        return text;
    }
}
